
void fun(char* Pstr, const int n) {
    int length = n % 26;
    int sz = 0;
    if (!n)
        return;
    while (Pstr[sz]) {
        if ((Pstr[sz] >= 'a' && Pstr[sz] <= 'z') || (Pstr[sz] >= 'A' && Pstr[sz] <= 'Z')) {
            if (((Pstr[sz] + length) >= 'a' && (Pstr[sz] + length) <= 'z') || ((Pstr[sz] + length) >= 'A' && (Pstr[sz] + length) <= 'Z'))
                Pstr[sz++] += length;
            else {
                if (Pstr[sz] >= 'a' && Pstr[sz] <= 'z')
                {
                    if (length > 0)
                        Pstr[sz++] += length - 26;
                    else
                        Pstr[sz++] += length + 26 ;
                }
                else {
                    if (length > 0)
                        Pstr[sz++] += length - 26 ;
                    else
                        Pstr[sz++] += length + 26 ;
                }
            }
        }
        else
            sz++;
    }
    return;
}